package com.hk.commons.entity.sys;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.annotations.Index;

@Entity
@Table(name = "SysModuleResource")
public class SysModuleResource implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3727052980497996982L;

	@Id
	@Column(name = "Id", length = 20)
	private Long id;

	@Column(name = "ModuleId", length = 10)
	@Index(name="idx_moduIdResId", columnNames={"moduleId", "resourceId"})
	private Long moduleId;

	@Column(name = "ResourceId", length = 10)
	private Long resourceId;

	@Column(name = "CreatedTS")
	private Long createdts = System.currentTimeMillis();

	@Column(name = "Creator", length = 20)
	private String creator;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getModuleId() {
		return moduleId;
	}

	public void setModuleId(Long moduleId) {
		this.moduleId = moduleId;
	}

	public Long getResourceId() {
		return resourceId;
	}

	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}
	
	public Long getCreatedts() {
		return createdts;
	}

	public void setCreatedts(Long createdts) {
		this.createdts = createdts;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String account) {
		this.creator = account;
	}
}
